Skip to content

fix(issue): runHeadless restarts on deterministic EXIT_ERROR without classification, looping through identical no-work state (headless.js:172)#6181

Open
jeremymcs wants to merge 3 commits into
mainfrom
issue/5739-runheadless-restarts-on-deterministic-ex-1778892827
Open

fix(issue): runHeadless restarts on deterministic EXIT_ERROR without classification, looping through identical no-work state (headless.js:172)#6181
jeremymcs wants to merge 3 commits into
mainfrom
issue/5739-runheadless-restarts-on-deterministic-ex-1778892827

Conversation

@jeremymcs
Copy link
Copy Markdown
Collaborator

Summary

  • Added deterministic no-work classification to suppress headless restart loops and report no-work-deterministic, verified via targeted headless-events tests.

Bugs Addressed

  • Headless restarts deterministic EXIT_ERROR states with no progress
  • Final headless status misclassifies deterministic no-work as timeout/error

Verification

  • Completed in the repository worktree before push.

Related Issue

Repo

  • gsd-build/gsd-2

Branch

  • issue/5739-runheadless-restarts-on-deterministic-ex-1778892827

jeremymcs added 2 commits May 15, 2026 19:56
… progress

added deterministic no-work restart classification to suppress useless `EXIT_ERROR` restart loops.
… as timeout/error

final summary/JSON status now reports deterministic no-work as `no-work-deterministic` instead of generic timeout/error.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 16, 2026

Warning

Rate limit exceeded

@jeremymcs has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minute and 27 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ea8ff06b-ad79-45b5-b4da-101e7ccd8ae1

📥 Commits

Reviewing files that changed from the base of the PR and between db89d64 and 255ca99.

📒 Files selected for processing (6)
  • README.md
  • docs/user-docs/commands.md
  • src/headless-events.ts
  • src/headless-types.ts
  • src/headless.ts
  • src/tests/headless-events.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue/5739-runheadless-restarts-on-deterministic-ex-1778892827

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 16, 2026

🟢 PR Risk Report — LOW

Files changed 6
Systems affected 1
Overall risk 🟢 LOW

Affected Systems

Risk System
🟢 low Headless Mode
File Breakdown
Risk File Systems
🟢 src/headless-events.ts Headless Mode
🟢 src/headless.ts Headless Mode
README.md (unclassified)
docs/user-docs/commands.md (unclassified)
src/headless-types.ts (unclassified)
src/tests/headless-events.test.ts (unclassified)

@jeremymcs
Copy link
Copy Markdown
Collaborator Author

🤖 Dispatched codex with the following prompt:

Agent prompt (click to expand)
You are acting as an autonomous PR babysitter for gsd-build/gsd-2 PR #6181.
PR URL: https://github.com/gsd-build/gsd-2/pull/6181
Base repository: gsd-build/gsd-2
Head repository: gsd-build/gsd-2
Head branch: issue/5739-runheadless-restarts-on-deterministic-ex-1778892827
Head remote: origin
You are running inside an isolated app-owned worktree under ~/.patchdeck.
Make only targeted changes that resolve the approved tasks.
Do not wait for user input, confirmation, or approval at any point.
Do not rewrite unrelated files.
Use the available git tooling for inspection and verification only.
If dependencies are missing, install them using the repository's lockfile/package manager as needed inside this isolated worktree.
Leave file edits uncommitted; the babysitter app will handle Git finalization after your run.
GitHub follow-up replies and review-thread resolution will be handled by the babysitter after your run.
If a task is invalid after inspection, explain it in your final response and include the exact audit token.

Approved review-comment tasks:
None

Approved status-check tasks:
None

Approved documentation tasks:
Documentation updates are required for this PR.
Assessment summary: PR changes headless externally observable behavior and output (`status` now includes `no-work-deterministic`, and restart policy/logging changes), so any docs describing headless result statuses, retry/restart behavior, or operator troubleshooting should be updated to match.
Update the appropriate repository documentation for these changes.
Choose the right docs files for this repository (for example README, docs pages, API/config/operator docs).
If, after inspection, the repository documentation is already accurate or there is no appropriate docs target, leave docs unchanged and report that using the docs summary block with `no_change`.

When done:
1) Run the relevant verification for your changes.
2) Leave any changed files in the worktree for the babysitter app to finalize.
3) For each feedback item you addressed or were blocked on, emit a summary block in the following format:
   FEEDBACK_SUMMARY_START <auditToken>
   <A concise 1-2 sentence summary of what you did or why you were blocked>
   FEEDBACK_SUMMARY_END
   Include one block per audit token. These summaries will be posted as follow-up comments on the PR.
4) If documentation tasks were assigned, emit exactly one docs summary block in the following format:
   DOCS_SUMMARY_START <changed|no_change>
   <A concise 1-2 sentence summary of the docs you updated, or why no docs changes were necessary after inspection>
   DOCS_SUMMARY_END

@jeremymcs
Copy link
Copy Markdown
Collaborator Author

⚠️ CI Alert

The babysitter pushed changes (commit 255ca99), but CI/CD checks are still failing:

  • build: Check run failure (details)

Manual investigation may be required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

runHeadless restarts on deterministic EXIT_ERROR without classification, looping through identical no-work state (headless.js:172)

1 participant